/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hu.rsc.feeds.client.service;

import hu.rsc.feeds.client.data.Category;
import hu.rsc.feeds.client.data.ColumnFilterList;
import hu.rsc.feeds.client.data.Entry;
import hu.rsc.feeds.client.data.Feed;
import hu.rsc.feeds.client.data.GeneratedEntry;
import hu.rsc.feeds.client.data.GeneratedFeed;
import hu.rsc.feeds.client.data.InitData;
import hu.rsc.feeds.client.data.ServerMessage;
import hu.rsc.feeds.client.data.SystemFeed;
import hu.rsc.feeds.client.data.UserCategory;
import hu.rsc.feeds.client.data.UserFeed;
import hu.rsc.feeds.client.data.UserInfo;

import java.util.List;

import com.google.gwt.gen2.table.client.TableModelHelper.Request;
import com.google.gwt.gen2.table.client.TableModelHelper.Response;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * 
 * @author arbuckle
 */
@RemoteServiceRelativePath("rscrssfeeds")
public interface RssReaderService extends RemoteService {
    public InitData autenticate(String userName, String password);

    public InitData doInit();

    public List<Category> getCategories();

    public Entry[] getEntries(String key);

    public List<Feed> getFeeds();

    public List<UserFeed> getUserFeeds();

    public Category newCategory(Category category);

    public Feed offer(String name, String url, Long category, String language, String description);

    public InitData register(UserInfo userInfo);

    public String saveUserFeeds(List<UserFeed> l);

    InitData autenticateDemo(String language);

    String deleteGeneratedEntry(Long id);

    String deleteGeneratedFeed(Long id);

    String deleteGeneratedSystemFeed(Long id);

    void deleteUserFeed(UserFeed userFeed);

    String getBlobStoreUploadUrl();

    Response<Feed> getFeeds(Request request);

    int getFeedsCount(ColumnFilterList filters);

    Response<GeneratedEntry> getGeneratedEntries(Request request, ColumnFilterList filters, Long generatedFeed);

    int getGeneratedEntriesCount(ColumnFilterList filters, Long generatedFeed);

    Response<GeneratedFeed> getGeneratedFeeds(Request request);

    Integer getGeneratedFeedsCount(ColumnFilterList columnFilterList);

    Response<SystemFeed> getSystemFeeds(Request request);

    int getSystemFeedsCount(ColumnFilterList filters);

    Boolean isLoggined();

    InitData logout();

    UserCategory newUserCategory(UserCategory usercategory);

    Feed saveFeed(Feed feed);

    GeneratedEntry saveGeneratedEntry(GeneratedEntry entry);

    GeneratedFeed saveGeneratedFeed(GeneratedFeed feed);

    ServerMessage<SystemFeed> saveSystemFeed(SystemFeed feed);

    void sendPost(Entry entry, List<String> recipients);

}
